Skip to content

Add Tools V2 (Orchestrate): a composable tool engine alongside V1 - #487

Open
shellicar wants to merge 144 commits into
mainfrom
feature/orchestrate
Open

Add Tools V2 (Orchestrate): a composable tool engine alongside V1#487
shellicar wants to merge 144 commits into
mainfrom
feature/orchestrate

Conversation

@shellicar

@shellicar shellicar commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds Orchestrate, a tool-calling system that composes registered tools into pipelines (|/&&/||), gated by a unified path/tool policy.
  • Ports most of the V1 catalogue: file tools, Program, Memory, History, Skill, GitHub/AzureDevOps PR tools, AzCli, and the four TypeScript tools.
  • V1 tools stay live. Only Pipe was retired, its job being covered by the new stages.
  • A stage can name its output with captureAs, and a command in a later stage reads it from the environment it runs under, so a credential reaches that command without passing through the model.
  • A stage is judged on what it will really do: every variable resolved and every path settled, so a -rf or a path that arrives in a variable is decided on as itself.
  • An approval request carries the stage as the caller wrote it, since the request is published whether or not it is granted, so a refused call exposes nothing.
  • A piped stage streams into the next one, so Find | Head stops looking once enough has been found.
  • A stage runs ahead of whoever is reading it by at most one buffer and then waits, the way a process waits on a full pipe.
  • A producer whose reader stops is stopped with it, and reports the signal it ended on rather than being called a failure.
  • Anything held whole is bounded: an approval batch and an Xargs argument list both stop the producer instead of growing, and the stage they were collected for does not run.
  • Program no longer kills a command for producing more than a fixed number of lines.
  • A policy path pattern is absolute: a leading glob means anywhere, and a pattern that names neither a place nor a glob is refused when the policy loads.
  • A stage can be fed by an Xargs stage, which appends the piped values to the argument list the receiving tool declares.
  • A pipeline is checked before it runs, so a pipe into a tool that cannot read one is refused with the correction named instead of quietly producing nothing.
  • Each stage reports how much it produced, and why it did not run when that is the answer.
  • Program runs under the environment provider, so a V2 exec gets the same credential stripping as a V1 one.
  • Every V2 tool_use in a round runs through one shared per-batch scope, so tools needing a live resource get one instance per round.
  • ESC now cancels a running Orchestrate/Program call directly, and a second ESC cancels the query even when the round has moved on to its V1 tools.
  • Every tool_use is answered, including the V2 blocks of a round that was cancelled before it started.
  • A call naming several paths is judged one path at a time and takes the strictest verdict, so a permitted path can no longer carry a forbidden one through with it.
  • Approval requests show where the stage sits in the pipeline and correlate to the tool_use block they belong to.
  • The shipped policy allows reads and listings inside the working directory, and decides nothing else.
  • The TypeScript tools no longer hang on a symbol whose documentation contains a non-ASCII character.

@shellicar shellicar added enhancement New feature or request pkg: claude-sdk-cli The new SDK-based CLI pkg: claude-sdk The agent SDK labels Jul 29, 2026
@shellicar
shellicar requested a review from bananabot9000 July 29, 2026 11:26
@shellicar shellicar added pkg: claude-sdk-tools The SDK tools package pkg: claude-core Core utilities — ansi, reflow, rendering pkg: orchestrate-core Package: orchestrate-core pkg: mcp-exec Package: mcp-exec pkg: mcp-memory Package: mcp-memory pkg: mcp-typescript Package: mcp-typescript labels Jul 29, 2026
@shellicar shellicar self-assigned this Jul 29, 2026
@shellicar shellicar added this to the 1.0 milestone Jul 29, 2026
@shellicar
shellicar force-pushed the feature/orchestrate branch 2 times, most recently from 391fa0f to 886726d Compare July 30, 2026 07:40
@shellicar
shellicar marked this pull request as ready for review July 30, 2026 07:41
…ssing V1's registry and permission matrix entirely
…ered first-match resolution, strictest-wins folding
…args — take an already-extracted Command instead
…m) instead of an invented, Exec-owned vocabulary
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request pkg: claude-core Core utilities — ansi, reflow, rendering pkg: claude-sdk The agent SDK pkg: claude-sdk-cli The new SDK-based CLI pkg: claude-sdk-tools The SDK tools package pkg: mcp-exec Package: mcp-exec pkg: mcp-memory Package: mcp-memory pkg: mcp-typescript Package: mcp-typescript pkg: orchestrate-core Package: orchestrate-core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant